package com.example.boot.service.impl;

import com.example.boot.mapper.TicketBizFlowModelMapper;
import com.example.boot.model.TicketBizFlowModel;
import com.example.boot.service.TicketBizFlowModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class TicketBizFlowModelServiceImpl implements TicketBizFlowModelService {

    @Autowired
    private TicketBizFlowModelMapper ticketBizFlowModelMapper;

    @Override
    public void insertOrUpdate() {

        TicketBizFlowModel model = new TicketBizFlowModel();
        model.setCreatedAt("yutao");
        model.setIsDelete(Byte.valueOf("0"));
        model.setUpdateAt("yubo");
        model.setName("测试处理方案");
        model.setRelationId("123");
        model.setType(1);

        List<TicketBizFlowModel> models = new ArrayList<>();
        models.add(model);
        ticketBizFlowModelMapper.insertOrUpdate(models);
    }
}
